package com.ssm.controller;

import com.ssm.dao.SysUserMapper;
import com.ssm.entity.SysUser;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * @author Alan
 * @Description
 * @date 2021年02月24日 16:14
 */
@Controller
@RequestMapping("/test")
@Slf4j
public class TestController {

    @Resource
    private SysUserMapper sysUserMapper;

    @RequestMapping("/hello")
    @ResponseBody
    public String hello() {
        log.info("hello********************");
        return "hello, permission";
    }

    @RequestMapping("/get")
    @ResponseBody
    public SysUser get() {
        log.info("hello********************");
        return sysUserMapper.selectByPrimaryKey(11L);
    }

}
